<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1322088_xpz3srlu2pi.css"/>
		<link rel="stylesheet" type="text/css" href="css/style.css"/>
		<link rel="stylesheet" type="text/css" href="js/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="css/anv.css"/>
	</head>
	<body>
		
		<div class="container-fluid bg-white">
			<!-- 订单详细 -->
			<div class="order order-xx">
				<div class="layui-tab layui-tab-brief" lay-filter="text">
					<ul class="layui-tab-title">
						<li class="layui-this">注册商机</li>
						<li>浏览商机</li>
					</ul>
					<div class="layui-tab-content">
						<div class="layui-tab-item layui-show">
							<div class="shangji">
								<i class="iconfont icon-search"></i>
								<input type="text" placeholder="请输入客户名称" value="" />
							</div>
							
							<table id="zhuce" lay-filter="test"></table>
							
						</div>
						<div class="layui-tab-item">
							<table id="liulan" lay-filter="test"></table>
						</div>
					</div>
				</div> 
			</div>
		</div>
		
		<style type="text/css">
			tbody tr .layui-table-cell{
				padding: 5px;
				height: 50px;
				line-height: 50px;
				text-align: center;
			}
			
			.layui-table-total .layui-table-cell{
				padding: 5px;
				height: 40px;
				line-height: 40px;
				text-align: center;
			}
			.goodsImg{
				width: 45px;
				height: 45px;
				background: no-repeat center center;
				background-size: cover;
			}
			.layui-tab-content {
				padding: 10px 0;
			}
			
			.layui-collapse{
				border-width: 0;
			}
			
			.layui-colla-content{
				padding: 0;
			}
			
			.layui-colla-title{
				padding: 0 15px 0 15px;
			}
			
			.layui-colla-title .layui-colla-icon{
				left: inherit;
				right: 15px;
			}
			
			.layui-table-view{margin: 0;}
			
		</style>
		
		<script src="js/jquery-v3-3.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/new_file.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/Gather.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			
			$(function(){
				var height = document.documentElement.clientHeight;
				console.log(height);
				$(".container-fluid").css({"height":(height-34)+"px"})
			})
			
			$(window).resize(function(){
				var height = document.documentElement.clientHeight;
				$(".container-fluid").css({"height":(height-67)+"px"})
			})
			
			layui.use(['form','table','element'], function(){
				var table = layui.table,
					form = layui.form,
					element = layui.element;
				
				
				// 数据列表渲染
				table.render({
					elem: '#zhuce'
					,data:DataArray2// data为数据库查到的数据
					,height: 450
					,cols: [[//以下field字段为为数据库相同,title为字段描述
						{field:'id', width:200, title: '经销商名称'}
						,{field:'pwd', width:150, title: '联系人'}
						,{field:'ame', width:130, title: '联系方式'}
						,{field:'sex', width: 300, title: '地址'}
						,{field:'rank', width:130, title: '申请时间',}
						,{field:'uptime', width:80, title: '推荐人',}
						,{field:'exptime', width:80, title: '加盟原因',}
						,{field:'money', width:80, title: '状态',}
					]]
				});
				
				table.render({
					elem: '#liulan'
					,data:DataArray2// data为数据库查到的数据
					,height: 450
					,cols: [[//以下field字段为为数据库相同,title为字段描述
						{field:'id', width:200, title: '手机号'}
						,{field:'pwd', width:250, title: '浏览时间'}
					]]
				});
				
				//监听行单击事件
				table.on('row(test)', function(obj){
				  console.log(obj.tr) //得到当前行元素对象
				  console.log(obj.data) //得到当前行数据
				  //obj.del(); //删除当前行
				  //obj.update(fields) //修改当前行数据
				  window.open('jxsxq.html', '_self');
				});
				
			})
		</script>
	</body>
</html>
